package acwing;
/**
 * @Project : AlgorithmLearning
 * @Package : ACWing.QuestionsPractice
 * @File : Q4944.java
 * @Author : WangRuoyu
 * @Date : 2023/4/1 19:00
 */

import java.io.*;

public class Q4944 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] words = br.readLine().split(" ");

        int a = Integer.parseInt(words[0]);
        int b = Integer.parseInt(words[1]);

        System.out.println(Math.min(a,b));;
        System.out.println((Math.max(a,b)-Math.min(a,b))/2);

    }
}


